import request from '@/config/axios'

export interface TransPlanMgrVO {
  id: number
  planNo: string
  customerId: number
  coalType: number
  loadingSiteId: number
  enableStatus: number
  planType: number
  planVehicleTotal: number
  startTime: Date
  endTime: Date
}

// 查询运输计划管理列表
export const getTransPlanMgrPage = async (params: TransPlanMgrPageReqVO) => {
  return await request.get({ url: `/queue/trans-plan-mgr/page`, params })
}

// 查询运输计划管理详情
export const getTransPlanMgr = async (id: number) => {
  return await request.get({ url: `/queue/trans-plan-mgr/get?id=` + id })
}

// 新增运输计划管理
export const createTransPlanMgr = async (data: TransPlanMgrVO) => {
  return await request.post({ url: `/queue/trans-plan-mgr/create`, data })
}

// 修改运输计划管理
export const updateTransPlanMgr = async (data: TransPlanMgrVO) => {
  return await request.put({ url: `/queue/trans-plan-mgr/update`, data })
}

// 删除运输计划管理
export const deleteTransPlanMgr = async (id: number) => {
  return await request.delete({ url: `/queue/trans-plan-mgr/delete?id=` + id })
}

// 导出运输计划管理 Excel
export const exportTransPlanMgr = async (params) => {
  return await request.download({ url: `/queue/trans-plan-mgr/export-excel`, params })
}
